﻿@using Happy.Cms.Query.Articles
@using Happy.ExtentionMethods;

@helper RenderListPanel(IEnumerable<ArticleView> articles, string title, string moreHref)
{
    <div class="tenoner-top-list-panel">
        <h1>@title</h1>
        <ul class="list-unstyled">
            @{ var index = 1; }
            @foreach (var article in articles)
            {
                <li>
                    <span class="label label-primary">@index</span>
                    <a  href="/Tenoner/Article/Detail/@article.Id" 
                        title="@article.Title">
                        @article.Title.Ellipsis(15)
                    </a>
                </li>
                index++;
            }
        </ul>
        <p><a class="btn btn-primary" role="button" href="@moreHref">更多</a></p>
    </div>
}